﻿using System;
using System.Linq.Expressions;
using System.ComponentModel;
using nRoute.Components;
using nRoute.Internal;

namespace nRoute.ViewModels
{
    public abstract class ViewModelBase
		 : INotifyPropertyChanged
    {

#region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        protected void NotifyPropertyChanged<T>(Expression<Func<T>> propertySelector)
        {
            Guard.ArgumentNotNull(propertySelector, "propertySelector");
            PropertyChanged.Notify<T>(propertySelector);
        }

#endregion

    }
}